package com.lzh.chatnote.chat.domain.vo.response.message;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

@ApiModel(value = "消息响应")
@Data
public class MessageResp {
    @ApiModelProperty(value = "用户信息")
    private UserInfo userInfo;
    @ApiModelProperty(value = "消息信息")
    private MessageInfo messageInfo;

    @Data
    public static class UserInfo {
        /**
         * 用户ID
         */
        @ApiModelProperty(value = "用户ID")
        private Long userId;

    }

    @Data
    public static class MessageInfo {
        @ApiModelProperty(value = "消息ID")
        private Long id;
        @ApiModelProperty(value = "房间ID")
        private Long roomId;
        @ApiModelProperty(value = "消息类型 1.文本消息 2.撤回消息 3.文件 4语音 ...")
        private Integer type;
        @ApiModelProperty(value = "消息内容 考虑多种类型的扩展性 TextMsgResp")
        private Object body;
        @ApiModelProperty(value = "消息时间")
        private LocalDateTime seedTime;
    }

}
